//
//  MemberRechargeController.m
//  yameishe3
//
//  Created by pro on 2017/3/8.
//  Copyright © 2017年 yameishe. All rights reserved.
//

#import "MemberRechargeController.h"
#import "MemberRechargeView.h"
@interface MemberRechargeController ()
{
    __weak IBOutlet UIScrollView *_scrollView;
    MemberRechargeView *_rechargeView;
}
@end

@implementation MemberRechargeController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self controllerSetting];
    
   
    _rechargeView = [[[NSBundle mainBundle]loadNibNamed:@"MemberRechargeView" owner:self options:nil] firstObject];
    _scrollView.contentSize = CGSizeMake(0, _rechargeView.height);
    [_scrollView addSubview:_rechargeView];
    [self.view layoutIfNeeded];
    [_rechargeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_scrollView);
        make.leading.trailing.equalTo(self.view);
        make.height.equalTo(@(_rechargeView.height));
    }];
    

    // Do any additional setup after loading the view.
}

-(void)viewWillDisappear:(BOOL)animated {
    // 反注册键盘
    [super viewWillDisappear:YES];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
